# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=mitmproxy
pkgver=0.18.2
pkgrel=3
pkgdesc="An interactive SSL-capable intercepting HTTP proxy"
url="https://www.mitmproxy.org/"
arch="noarch"
license="MIT"
depends="python3 py3-flask py3-urwid py3-$pkgname py3-itsdangerous"
makedepends="py3-setuptools"
subpackages="py3-$pkgname:_py"
source="$pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz"

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

_py() {
	cd "$builddir"
	pkgdesc="$pkgname python3 bindings"
	install -d "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

sha512sums="39836063a041d7fd14bb82ccf2fb53262b8ec14b629197776e27ebfb2fc97103ee5b4af979ffe6db35103e833679e2e5a640295831d55a2cd0f20a602b559064  mitmproxy-0.18.2.tar.gz"
